package com.wnx.action;

import java.util.Hashtable;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.wnx.db.ReviewDao;
import com.wnx.entity.Goods;
import com.wnx.entity.Review;
import com.wnx.service.BuyService;

public class BuyAjaxAction extends ActionSupport {
	private Map<String,List<Review>> dataMap = new Hashtable<>();
		
		public Map<String, List<Review>> getDataMap() {
			return dataMap;
		}

	public String execute() {
		HttpServletRequest request = ServletActionContext.getRequest();
		int id = Integer.parseInt(request.getParameter("id"));
		ReviewDao rd = new ReviewDao();
		List<Review> review  = rd.getReviewFive(id);
		dataMap.put("review", review);
		return SUCCESS;
}
	}
